import request from './request'

// 模型管理
export const getModels = (params) => request.get('/admin/models', { params })
export const createModel = (data) => request.post('/admin/models', data)
export const updateModel = (id, data) => request.patch(`/admin/models/${id}`, data)

// 工具管理
export const getTools = (params) => request.get('/admin/tools', { params })
export const createTool = (data) => request.post('/admin/tools', data)
export const updateTool = (id, data) => request.patch(`/admin/tools/${id}`, data)

// Agent管理
export const getAgents = (params) => request.get('/admin/agents', { params })
export const createAgent = (data) => request.post('/admin/agents', data)
export const updateAgent = (id, data) => request.patch(`/admin/agents/${id}`, data)
export const deleteAgent = (id) => request.delete(`/admin/agents/${id}`)

// 用户管理
export const getUsers = (params) => request.get('/admin/users', { params })

// 热门工具
export const addHotTool = (agent_id, sort) => request.post('/admin/hot-tools', { agent_id, sort })
export const removeHotTool = (id) => request.delete(`/admin/hot-tools/${id}`)

